package com.lzw.breezeNovel.webApp.controller.user;

import com.lzw.breezeNovel.common.result.Result;
import com.lzw.breezeNovel.model.entity.pojo.user.UserLike;
import com.lzw.breezeNovel.model.entity.query.PaginationResultQuery;
import com.lzw.breezeNovel.webApp.service.user.UserLikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author 清风明月
 * @Package com.lzw.breezeNovel.webApp.controller.user
 * @date 2025/3/24
 * @description 用户点赞表
 */
@RestController
@RequestMapping("/app/userLike")
@SuppressWarnings("all")
public class UserLikeController {

    /**
     * 注入service
     */
    @Autowired
    private UserLikeService userLikeService;

    /**
     * 分页获取
     */
    @GetMapping("/list")
    public Result<PaginationResultQuery<UserLike>> list(@RequestParam Integer pageNo, @RequestParam Integer size){
         PaginationResultQuery<UserLike> userLikeList = userLikeService.list(pageNo, size);
         return Result.ok(userLikeList);
    }

    /**
     * 删除
     */
    @DeleteMapping("/delete")
    public Result delete(@RequestParam Long id){
         userLikeService.delete(id);
         return Result.ok();
    }




}
